﻿using System;
using System.Data.SqlClient;
using System.Data;

using DevExpress.XtraReports.UI;
using prjKQXS_DLL;

namespace prjKQXS_Report.Truyen_thong
{
    public partial class rptThongKeTT_DV_Ngay : DevExpress.XtraReports.UI.XtraReport
    {
        public DataTable dtSource;
        public string TyLe = "";

        public rptThongKeTT_DV_Ngay()
        {
            InitializeComponent();
        }

        private void rptThongKeTT_DV_Ngay_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            xrlblNgay.Text = "Từ ngày " + ((DateTime)pTuNgay.Value).ToString("dd/MM/yyyy") + " đến ngày " + ((DateTime)pDenNgay.Value).ToString("dd/MM/yyyy");
            lblHT.Text = TyLe;

            Report_DAL report_dal = new Report_DAL();
            dsReports dsReports1 = new dsReports();
            dsReports1 = report_dal.reportDungChung(dsReports1);

            dsReports1.Tables.Remove("TruyenThong");
            dsReports1.Tables.Add(dtSource);
            this.DataSource = dsReports1;
            this.DataMember = "TruyenThong";
        }
    }
}
